package org.opentcs.kcvehicle.communication.kc.udp.agv.param.function.b1;

import org.opentcs.kcvehicle.communication.kc.common.byteutils.ByteUtils;

/**
 * @Desc: ""
 * @Author: caixiang
 * @DATE: 2025/2/5 14:21
 */
public class SubscribeRsp {
    //源数组
    private byte[] src;
    //uuid 64个字节
    private byte[] uuid;
    //errCode 1个字节
    private byte errCode;
    //reserved 3个字节
    private byte[] reserved;
    public SubscribeRsp(byte[] src) {
        this.src = src;
        this.uuid = ByteUtils.copyOfRange(src,0,64);
        this.errCode = src[64];
        this.reserved = ByteUtils.copyOfRange(src,65,67);
    }

    public boolean isOk(){
        if(this.errCode==0){
            return true;
        }else {
            return false;
        }
    }
}
